package com.xk.androiddemo.model;

public class MonitorDataItem {

    private double gasPressure; // 燃气压力
    private double flowRate; // 流量
    private boolean valvePosition; // 阀门位置
    private double valveOpening; // 阀门开度
    private double liquidLevel; // 液位
    private double current; // 电流
    private double voltage; // 电压
    private boolean alarmSet; // 报警设置

    // 构造函数
    public MonitorDataItem(double gasPressure, double flowRate, boolean valvePosition, double valveOpening,
                           double liquidLevel, double current, double voltage, boolean alarmSet) {
        this.gasPressure = gasPressure;
        this.flowRate = flowRate;
        this.valvePosition = valvePosition;
        this.valveOpening = valveOpening;
        this.liquidLevel = liquidLevel;
        this.current = current;
        this.voltage = voltage;
        this.alarmSet = alarmSet;
    }

    // Getter 和 Setter 方法
    public double getGasPressure() {
        return gasPressure;
    }

    public void setGasPressure(double gasPressure) {
        this.gasPressure = gasPressure;
    }

    public double getFlowRate() {
        return flowRate;
    }

    public void setFlowRate(double flowRate) {
        this.flowRate = flowRate;
    }

    public boolean getValvePosition() {
        return valvePosition;
    }

    public void setValvePosition(boolean valvePosition) {
        this.valvePosition = valvePosition;
    }

    public double getValveOpening() {
        return valveOpening;
    }

    public void setValveOpening(double valveOpening) {
        this.valveOpening = valveOpening;
    }

    public double getLiquidLevel() {
        return liquidLevel;
    }

    public void setLiquidLevel(double liquidLevel) {
        this.liquidLevel = liquidLevel;
    }

    public double getCurrent() {
        return current;
    }

    public void setCurrent(double current) {
        this.current = current;
    }

    public double getVoltage() {
        return voltage;
    }

    public void setVoltage(double voltage) {
        this.voltage = voltage;
    }

    public boolean isAlarmSet() {
        return alarmSet;
    }

    public void setAlarmSet(boolean alarmSet) {
        this.alarmSet = alarmSet;
    }

    // toString 方法，用于打印 MonitorDataItem 的信息
    @Override
    public String toString() {
        return "MonitorDataItem{" +
                "gasPressure=" + gasPressure +
                ", flowRate=" + flowRate +
                ", valvePosition=" + valvePosition +
                ", valveOpening=" + valveOpening +
                ", liquidLevel=" + liquidLevel +
                ", current=" + current +
                ", voltage=" + voltage +
                ", alarmSet=" + alarmSet +
                '}';
    }
}